#ifndef VERSIONCHOOSE_H
#define VERSIONCHOOSE_H

#include <QDialog>

namespace Ui {
class VersionChoose;
}

class VersionChoose : public QDialog
{
    Q_OBJECT

public:
    explicit VersionChoose(QWidget *parent = nullptr);
    ~VersionChoose();

    QString show(const QStringList &packages);

private:
    void initWidget();
    void initTableHeader();
    void fillTableData(const QStringList &packages);
    void setSelectedRowSign(int row, bool show);

protected:
    void paintEvent(QPaintEvent *);
    void showEvent(QShowEvent *);

private slots:
    void on_btnCancel_clicked();
    void on_btnClose_clicked();
    void on_tableWidget_cellClicked(int row, int column);
    void on_btnConfirm_clicked();

private:
    Ui::VersionChoose *ui;
    QString m_packageName;
};

#endif // VERSIONCHOOSE_H
